<script setup lang="ts">
import {ref,reactive,shallowRef,shallowReactive} from "vue"

//shallowRef用于声明原始数据类型的响应式数据(浅层)，ref是深层
//shallowReactive用于声明对象类型的响应式数据(浅层)，reactive是深层
let text=shallowReactive({
  name:"yy",
  score:{
    yuwen:102,
    shuxue:120
  }
})
</script>

<template>
  <div>
    <div>{{ text.name }}</div>
    <div>{{ text.score}}</div>
    <input type="text" v-model="text.name">
    <input type="text" v-model="text.score.yuwen">
    <input type="text" v-model="text.score.shuxue">
  </div>
</template>

<style scoped>

</style>
